<?

if (sizeof($this->myGroup) < $this->maxPartySize)
{
  $this->party->autoGroup($this->user->localRecord['u_key'], $this->maxPartySize);
}
$this->myGroup = $this->party->loadGroup($this->user->localRecord['u_key']);

?><h4>Your Group</h4>
<table width="100%"><?

foreach($this->myGroup as $member)
{
  $hp = $member['p_hp'];
  $char = new CharacterModel('', $this, $member['c_key']);
  unset($char->stats['HP.current']);
  $hpmax = $char->getCharacterStat('HP');
  if ($hp == '-') $hp = $hpmax;
  $pic = $member['u_fb_pic_square'];
  if ($member['p_type'] == 'mob') $pic = 'img/'.$member['c_icon'].'.png';
  if ($hp < 0) $pic = 'img/icons/combat-dead.png';
  ?><tr>
    <td width="28" valign="top">
      <img width="26" src="<?= $pic ?>"/>
    </td>
    <td valign="top" <? if ($hp < 0) print('style="color: gray;"'); ?>>
      <?= $member['c_name'] ?>, Level <?= $member['c_level'] ?><br/>
      <?= $hp.'/'.$hpmax ?> HP
    </td>
  </tr><?
}

?></table><br/>

You can take up to <?= $this->maxPartySize ?> <a href="<?= actionUrl('index', 'party') ?>">party members</a> with you on this mission.<br/>
<br/>
<?
if ($this->character->getCharacterStat('AP') > 5)
{
?>
<a href="<?= actionUrl('index', 'game', 'cmd=rest') ?>" class="linkbutton">Make Camp & Rest</a>
<?
}
?>